package m3d29;

public class gGetThreadName {
    public static void main(String[] args){
        fMyThread one = new fMyThread();
        one.start();
        new fMyThread("构造犯法").start();

        //用thread的方法获取当前的线程，在调用getname
        System.out.println(Thread.currentThread().getName());

        for (int i = 0; i < 3; i++) {
            System.out.println(i);
        }

        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
